package com.tcd.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tcd.pojo.User;
import io.swagger.models.auth.In;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author space
 * @since 2021-05-21
 */
public interface UserMapper extends BaseMapper<User> {
    List<User> selectUserFilter(@Param("pageIndex") Integer pageIndex, @Param("pageSize") Integer pageSize, @Param("userName") String userName, @Param("roleId") Integer roleId);

    Integer selectUserFilterCount(@Param("userName") String userName, @Param("roleId") Integer roleId);

    Integer setUserRoles(@Param("uid") Integer uid,@Param("roleIds") Integer[] roleIds);

    Integer delUserRole(Integer uid);

    User selectUserById(Integer uid);

    List<User> selectUserByGroup(Integer groupId);
}
